<template>
	<div id="app">
		<router-view/>
	</div>
</template>

<script>
	export default {
		watch: {
			$route(to, from) { //监控路由发生变化，触发事件to为进入页面，from为离开页面
				document.title = to.meta.title;
			}
		}
	}
</script>

<style>
	#app {
		font-family: 'Avenir', Helvetica, Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-align: center;
		color: #2c3e50;
		margin-top: 60px;
	}
</style>